﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Ubatic.Ui.Web.Code
{
    public class BasePage : System.Web.UI.Page, IWebMessage
    {

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            ExceptionManager.Instance.WebMessager = this.Master as IWebMessage;
        }       

        public void ShowMessage(string message, WebMessageType type)
        {
            Main main = (Main)this.Master;
            main.ShowMessage(message, type);
        }

        public void ShowMessage(string title, string message, WebMessageType type)
        {
            Main main = (Main)this.Master;
            main.ShowMessage(title, message, type);
        }
    }
}